#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
    int n, m;
    scanf("%d", &n);
    int ret = 0;
    for (int i = 0; i < n; i++)
    {
        scanf("%d", &m);
        ret ^= m;
    }
    printf("%d", ret);
    return 0;
}